package algorithmTopics.string;

import java.util.*;

public class Main1 {


    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String[] lines = sc.nextLine().split(" ");
        sc.close();
        String res = "";
        for(int i = 0; i < lines.length; i++){
            if (i == 0) {
                res = convertString(lines[i],lines[i].length()) ;
                continue;
            }
            if(i == lines.length - 1 && lines[i].charAt(lines.length - 1) == '.'){
                res = res + " " +convertString(lines[i],lines[i].length() - 1);
                break;
            }
            res = res +" "+ convertString(lines[i],lines[i].length()) ;
        }

        System.out.println(res + ".");
    }
    //翻转单词
    static String convertString(String s , Integer len){
        String res = "";
        for(int i = 0; i < len;i++){
            res = s.charAt(i) + res;
        }
        return res;
    }
}